home *** CD-ROM | disk | FTP | other *** search
/ Aminet 1 (Walnut Creek) / Aminet - June 1993 [Walnut Creek].iso / usenet / sources / volume90 / util / bsindex1 / part01 / src / bbs.h next >
Text File  |  1990-02-02  |  3KB  |  99 lines

  1. /*
  2.  *        Standard BBS-PC! headers (with a few modifications)
  3.  *
  4.  *        Important note: This header file cannot be precompiled with
  5.  *        Lattice C V5.02, because of a bug which prevents bit fields
  6.  *        from working properly when they are precompiled.
  7.  */
  8.  
  9. /* Official Micro-Systems Software Structures */
  10.  
  11. #define NUM_TERM    10        /* Number of computer types        */
  12. #define NUM_SECT    16        /* Number of section names        */
  13.  
  14. #define CAT_LEN        15        /* File catalogue name lengths    */
  15. #define DESC_LEN    40        /* File catalogue desc length    */
  16. #define    FNAME_LEN    12        /* File name lengths            */
  17. #define FPATH_LEN    30        /* File name path lengths        */
  18. #define    NAME_LEN    24        /* User name length                */
  19. #define PASS_LEN    10        /* User password length            */
  20. #define SECT_LEN    20        /* Section name lengths            */
  21. #define TERM_LEN    15        /* Computer name lengths        */
  22.  
  23. /* UDHEAD.DAT record structure */
  24.  
  25. /* Note some new additions to this structure, for internal tracking */
  26.  
  27. typedef struct {
  28.     BYTE    type;
  29.     int        local:1;                    /* True if local upload            */
  30.     int        bin:1;                        /* True if binary file            */
  31.     int        valid:1;                    /* True if valid              NEW */
  32.     int        online:1;                    /* True if file online        NEW    */
  33.     int        dirnum:5;                    /* Real dir num of file        NEW */
  34.     int      :7;                            /* Reserved             CHANGED */
  35.     char    cat_name[CAT_LEN];            /* Catalog filename (key1)        */
  36.     UWORD    date;                        /* Upload date serial            */
  37.     BYTE    dir;                        /* Dir number (key2 - seg1)        */
  38.     BYTE    section;                    /* Section number (key2 - seg2)    */
  39.     UWORD    accesses;                    /* Number of accesses            */
  40.     LONG    length;                        /* File length                    */
  41.     char    disk_name[FNAME_LEN+1];        /* Disk filename                */
  42.     char    owner[NAME_LEN+1];            /* Owner's name                    */
  43.     char    desc[DESC_LEN+1];            /* Description text                */
  44. } UDHEAD;
  45.  
  46. #define UDSIZE        sizeof(UDHEAD)
  47.  
  48.  
  49. /* Terminal parameters */
  50.  
  51. typedef struct {
  52.     int        linefeed: 1;
  53.     int        :31;
  54.     BYTE    nuls;
  55.     BYTE    protocol;
  56.     BYTE    align;
  57.     BYTE    page[2];
  58.     BYTE    cls[4];
  59.     BYTE    bs[3];
  60.     char    name[TERM_LEN+1];
  61. } TRMNL;
  62.  
  63.  
  64. /* CFGINFO.DAT record structure */
  65.  
  66. typedef struct {
  67.     int        dir0_ok: 1;        /* Directory 0 downloads            */
  68.     int        by_call: 1;        /* Time limit per call                */
  69.     short    max_msg;        /* Maximum messages in system        */
  70.     short    max_user;        /* Maximum users in system            */
  71.     short    max_log;        /* Maximum call log                    */
  72.     short    max_ud;            /* Maximum U/D files                */
  73.     short    reward;            /* Upload reward                    */
  74.     short    sleeptime;        /* sleep timeout (adjusted)            */
  75.     long    dummy;            /* Reserved                            */
  76.     BYTE    log_p1;            /* Log privilege low                */
  77.     BYTE    log_p2;            /* Log privilege high                */
  78.     BYTE    hi_men;            /* Highest menu set                    */
  79.     BYTE    log_type;        /* Login method                        */
  80.     short    limit[2];        /* Guest/member time limits         */
  81.     short    priv[2];        /* Guest/member privileges            */
  82.     UWORD    rd_acc[2];        /* Guest/member read access            */
  83.     UWORD    wr_acc[2];        /* Guest/member write access        */
  84.     UWORD    up_acc[2];        /* Guest/member upload access        */
  85.     UWORD    dn_acc[2];        /* Guest/member download access        */
  86.     BYTE    sav_sec[2];        /* Guest/member save section        */
  87.     BYTE    sec_flg[NUM_SECT];                    /* Section flags            */
  88.     char    sec_name[NUM_SECT] [SECT_LEN+1];    /* Section names            */
  89.     char    ud_alt[NUM_SECT] [FPATH_LEN+1];        /* Alternate UD paths        */
  90.     char    syspass[PASS_LEN+1];                /* Sysop password             */
  91.     BYTE    menu[2];                            /* Guest/Member menu sets    */
  92.     BYTE    align;
  93.     long    dummy2;
  94.     long    dummy3;
  95.     TRMNL    trmnl[NUM_TERM];                    /* Terminal parameters        */
  96. } CFGINFO;
  97.  
  98. #define CFGSIZE        sizeof(CFGINFO)
  99.